package com.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mapper.BlogMapper;
import com.model.Blog;
import com.service.BlogService;

@Service
public class BlogServiceImpl implements BlogService{

	@Autowired private BlogMapper blogMapper;

	@Override
	public Blog findByID(Integer id) {
		return blogMapper.findByID(id);
	}

	@Override
	public void save(Blog blog) {
		blogMapper.save(blog);
	}

	@Override
	public void delete(Integer id) {
		blogMapper.delete(id);
	}

	@Override
	public void update(Blog blog) {
		blogMapper.update(blog);
	}

	@Override
	public List<Blog> list() {
		return blogMapper.list();
	}

}
